import { axios } from '@/utils/request'

/**
 * 查询自定义流程业务单列表
 * @param query
 * @returns {*}
 */
export function pageCustomForm(query) {
  return axios({
    url: '/workflow/customForm/page',
    method: 'get',
    params: query
  })
}

/**
 * 查询自定义流程业务单详细
 * @param id
 * @returns {*}
 */
export function getCustomForm(id) {
  return axios({
    url: '/workflow/customForm/' + id,
    method: 'get'
  })
}

/**
 * 新增自定义流程业务单
 * @param data
 * @returns {*}
 */
export function addCustomForm(data) {
  return axios({
    url: '/workflow/customForm',
    method: 'post',
    data: data
  })
}

/**
 * 修改自定义流程业务单
 * @param data
 * @returns {*}
 */
export function updateCustomForm(data) {
  return axios({
    url: '/workflow/customForm',
    method: 'put',
    data: data
  })
}

/**
 * 根据选择关联的流程定义，更新自定义流程表单列表
 * @param data
 * @returns {*}
 */
export function updateCustom(data) {
  return axios({
    url: '/workflow/customForm/updateCustom',
    method: 'post',
    data: data
  })
}

/**
 * 删除自定义流程业务单
 * @param id
 * @returns {*}
 */
export function delCustomForm(id) {
  return axios({
    url: '/workflow/customForm/' + id,
    method: 'delete'
  })
}
